package com.zerowidth.moc.web.Aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Aspect
@Configuration
@Component
public class NeedTokenImpl {

    private static final String TAG = "NeedTokenImpl";

    @Pointcut("@annotation(com.zerowidth.moc.web.auth.annotation.NeedToken)")
    private void cut() {
    }

    /**
     * <h5>功能:前置通知</h5>
     */
    @Before("cut()")
    public void before() {
        System.out.println(TAG + "自定义注解生效了");
    }
}
